﻿<TreeView TItem="TreeFoo" ClickToggleNode="true" Items="GetColorItems()" />

@code {
    private static List<TreeViewItem<TreeFoo>> GetColorItems()
    {
        var ret = TreeFoo.GetTreeItems();
        ret[0].CssClass = "text-primary";
        ret[1].CssClass = "text-success";
        ret[2].CssClass = "text-danger";
        return ret;
    }
}
